-
Notifications
You must be signed in to change notification settings - Fork 3.2k
create a new task object before showing the taskModal #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This same change should be made when the TodoCtrl code is repeated under the Adding Projects header. I didn't look ahead to do that. |
|
Wait, when the TodoCtrl code is repeated under the Adding Projects header, the So a new object is created each time a task is pushed onto the array. That's another way to solve it. Maybe the solution is to push |
|
@DallanQ I still think that the |
|
I agree. There are at least a couple of ways to fix it. I've given a pull request for one, and explained the other in the comment above. I'm not sure why it hasn't been fixed yet. |
|
Thanks guys, we will get this fixed soon! |
|
Sorry, haven't checked existig PRs and resolved it in #118 (https://github.com/ciastek/ionic-site/commit/1a43b9c2633e9cc2a686b09f7925c26a20489f3f). Solution matches the one used in createTask with projects. |
|
Thanks! |
Without this I get an
Error: [ngRepeat:dupes] Duplicates in a repeater are not allowedif I add more than one task to the Creating Tasks example, because each time $scope.createTask is called, the same $scope.task object (with an updated title) is pushed onto the array. Alternatively, you could setng-submit="createTask({title: task.title})"instead ofcreateTask(task), but setting$scope.task = {}before showing the dialog also clears the task title so you see the placeholder text, which is nice.